<?php
/**
 * Created by PhpStorm.
 * User: Ellon_Wong
 * Date: 14-4-25
 * Time: 下午10:26
 */


header('Access-Control-Allow-Origin: *');
header('Access-Control-Allow-Methods: POST');
header('Access-Control-Max-Age: 1000');

include_once dirname(__FILE__) . '/server/server.php';


function RequestSolve(){
    switch ($_SERVER["REQUEST_METHOD"]){
        case "GET":$result = Server_go($_GET);break;
        case "POST":$result = Server_go($_POST);break;
        default :$result =Server_go($_POST);break;
    }

    echo json_encode($result);
}

RequestSolve();

